package com.dkm.orproject.dkmoa.dao;

import com.dkm.orproject.dkmoa.domain.OaFlowPersonnel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OaFlowPersonnelMapper {
    int deleteByPrimaryKey(Long pkFlowPersonnelId);

    int insert(OaFlowPersonnel record);

    int insertSelective(OaFlowPersonnel record);

    OaFlowPersonnel selectByPrimaryKey(Long pkFlowPersonnelId);

    int updateByPrimaryKeySelective(OaFlowPersonnel record);

    int updateByPrimaryKey(OaFlowPersonnel record);

    /**
     * 批量新增
     * @param flowPersonnels
     * @return
     */
    int insertAll(@Param("list") List<OaFlowPersonnel> flowPersonnels);

    /**
     * 根据流程id删除
     * @param pkFlowId 流程id
     * @return 回调函数
     */
    int deleteByFlowId(@Param("pkFlowId") Long pkFlowId);

    /**
     * 流程id批量删除
     * @param list 流程id集合
     * @return 回调函数
     */
    int deleteFlowAll(@Param("list") List<Long> list);

    /**
     * 流程id查询
     * @param flowId 流程id
     * @return
     */
    List<OaFlowPersonnel> findAll(@Param("flowId")Long flowId);
}